﻿using System;
using System.Drawing;
using System.Windows.Forms;

namespace sy4_8
{
    public partial class Form6 : Form
    {
        public Form6()
        {
            InitializeComponent();
            this.Text = "关于本程序";
        }

        private void Form6_Load(object sender, EventArgs e)
        {
            // 设置窗体属性
            this.Size = new Size(400, 300);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.StartPosition = FormStartPosition.CenterParent;

            // 创建控件
            Label titleLabel = new Label();
            titleLabel.Text = "多重窗体应用程序演示";
            titleLabel.Font = new Font("微软雅黑", 16, FontStyle.Bold);
            titleLabel.AutoSize = true;
            titleLabel.Location = new Point(80, 30);

            Label versionLabel = new Label();
            versionLabel.Text = "版本 1.0";
            versionLabel.Font = new Font("微软雅黑", 12);
            versionLabel.AutoSize = true;
            versionLabel.Location = new Point(150, 80);

            Label copyrightLabel = new Label();
            copyrightLabel.Text = "版权所有 侵权必究";
            copyrightLabel.Font = new Font("微软雅黑", 10);
            copyrightLabel.AutoSize = true;
            copyrightLabel.Location = new Point(120, 120);

            Label descriptionLabel = new Label();
            descriptionLabel.Text = "本程序演示了：\n• 多重窗体应用程序设计\n• 菜单、工具栏、状态栏的使用\n• 窗体间的通信和管理";
            descriptionLabel.Font = new Font("微软雅黑", 10);
            descriptionLabel.AutoSize = true;
            descriptionLabel.Location = new Point(50, 160);

            Button okButton = new Button();
            okButton.Text = "确定";
            okButton.Size = new Size(80, 30);
            okButton.Location = new Point(160, 220);
            okButton.DialogResult = DialogResult.OK;

            // 添加控件到窗体
            this.Controls.AddRange(new Control[] {
                titleLabel, versionLabel, copyrightLabel,
                descriptionLabel, okButton
            });
        }
    }
}